package net.adetech.crj.service;

import net.adetech.crj.dao.QueueMapper;
import net.adetech.crj.entity.Queue;
import net.adetech.crj.utils.ServiceUtil;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.sql.Timestamp;
import java.util.List;
import java.util.Map;

@Service("queue.getNewQueueList")
public class GetNewQueueListService implements BaseService{
    @Autowired
    QueueMapper queueMapper;

    @Override
    public Map<String, Object> invoke(Map<String, Object> params) {

        Timestamp maxUpdateTime = (Timestamp)params.get("maxUpdateTime");
        List<Queue> queueList = queueMapper.getNewQueueList(maxUpdateTime);

        return ServiceUtil.buildResult("queueList",queueList);
    }
}
